{% extends "base.html" %}

{% block title %}{{room|lower|capfirst}}{% endblock %}

{% block head %}
<script>
$(document).ready(function(){
  
});
</script>
{% endblock %}

{% block container %}
<div class="row">
  <div class="span12">
    Current timeblock:
    <select id="time_block">
      {% for time_block_option in time_blocks %}
        <option value="{{time_block_option.pk}}" 
            {% if time_block_option == time_block %}selected="selected"{% endif %}>
          {{time_block_option}}
        </option>
      {% endfor %}
    </select>
  </div>
</div>
<div class="hero-unit">
  {% if sections %}<h2 class="pull-right">{{sections.0.time}}</h2>{% endif %}
  <h1>{{room|lower|capfirst}}</h1>
  <h2>
    {% if sections %}
      {{sections.0}}
    {% else %}
      Looks like this classroom is empty right now
    {% endif %}
    <small>
    {% for section in sections %}
      {% if not forloop.first %}
        , {{section}}
      {% endif %}
    {% endfor %}
    </small>
  </h2>
</div>
{% if sections and sections.0.course.description %}
<div class="row">
  <div class="span12">
    <div class="well">
      {{sections.0.course.description}}
    </div>
  </div>
</div>
{% endif %}
<div class="span6 well">
  <form action="{{url}}" method="POST">
    {% csrf_token %}
    <div><input type="text" name="name" placeholder="Your name"></div>
    <div><input type="text" name="comment" placeholder="Write a comment" id="></div>
  </form>
</div>
{% endblock %}